package com.example.luckybag.service

import android.accessibilityservice.AccessibilityService
import com.example.luckybag.sysservice.MyAccessibilityService

/**
 * 文件名： <br/>
 * 描述：用于返回对应服务的具体实现类🌝🌝🌝
 *
 * @author wulinran
 * @since 2023/2/10 10:29
 */
class LuckyServiceProvide {

    companion object {

        fun getService(packageName: String, service: AccessibilityService): LuckyBagService? {
            return when (packageName) {
                MyAccessibilityService.WECHAT_PACKAGE_NAME -> {
                    WechatLuckyBagService(service)
                }

                MyAccessibilityService.DING_TALK_PACKAGE_NAME -> {
                    DingTalkLuckyBagService(service)
                }

                else -> {
                    null
                }
            }

        }

    }
}